﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="et_test.App" 
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
             xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             >
<Application.Resources>
        <Style x:Key="ChildStyle2" TargetType="controls:ChildWindow">
            <Setter Property="OverlayBrush" Value="{x:Null}"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="TabNavigation" Value="Cycle"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="controls:ChildWindow">
                        <Grid x:Name="Root">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="WindowStates">
                                    <vsm:VisualState x:Name="Open">
                                        <Storyboard>
                                            <DoubleAnimation   From="0" To="1.0" Duration="00:00:0.2" 
                                                                Storyboard.TargetName="ContentRoot" 
                                                                Storyboard.TargetProperty="Opacity" >
                                            </DoubleAnimation>
                                            <!--<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="Overlay" Storyboard.TargetProperty="Opacity">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                                                <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                                                <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>-->
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Closed">
                                        <Storyboard>
                                            <DoubleAnimation   From="1.0" To="0" Duration="00:00:0.2" 
                                                                Storyboard.TargetName="ContentRoot" 
                                                                Storyboard.TargetProperty="Opacity" >
                                            </DoubleAnimation>
                                            <!--<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="Overlay" Storyboard.TargetProperty="Opacity">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>-->
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <Grid x:Name="Overlay" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" Opacity="0.5">
                                <Grid.Background>
                                    <SolidColorBrush/>
                                </Grid.Background>
                            </Grid>
                            <Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" RenderTransformOrigin="0.5,0.5" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>

                                <!--<Border BorderThickness="1" CornerRadius="2.25" BorderBrush="#0F000000" Background="#0F000000" HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"/>
                            <Border BorderThickness="1" CornerRadius="2.5" BorderBrush="#0C000000" Background="#0C000000" HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"/>
                            <Border BorderThickness="1" CornerRadius="2.75" BorderBrush="#0A000000" Background="#0A000000" HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"/>-->

                                <Border Background="#7B00335A" BorderBrush="#FF646464" BorderThickness="1" CornerRadius="8">

                                    <!--<Border.BorderBrush>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                        <GradientStop Color="#FF617584" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>-->
                                    <Border.Effect>
                                        <DropShadowEffect x:Name="dropShadowEffect" 
                                    BlurRadius="30" 
                                    Color="#FF2B2A2A" 
                                    Direction="0" 
                                    Opacity="1" 
                                    ShadowDepth="10" />
                                    </Border.Effect>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"></RowDefinition>
                                            <RowDefinition></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Border x:Name="Chrome" Height="30" Width="Auto" Background="#09F9F9F9" >

                                            <!--<Border.Background>
                                                <LinearGradientBrush EndPoint="0.5,0.528" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFE5E8EB" Offset="1"/>
                                                    <GradientStop Color="#FFFEFEFE" Offset="0"/>
                                                </LinearGradientBrush>
                                            </Border.Background>-->
                                            <Grid Height="Auto" Width="Auto">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition/>
                                                    <ColumnDefinition Width="30"/>
                                                </Grid.ColumnDefinitions>
                                                <ContentPresenter Content="{TemplateBinding Title}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="6,0,6,0"/>
                                            </Grid>
                                        </Border>
                                        <Border Grid.Row="1" BorderBrush="White"  BorderThickness="1" Margin="5,0,5,5">
                                            <Border  BorderBrush="#FF3C3C3C"    Margin="1">
                                                <Border.Background>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#FFF5F7F8" Offset="0" />
                                                        <GradientStop Color="#FFE4E7EA" Offset="1" />
                                                    </LinearGradientBrush>
                                                </Border.Background>
                                                <Grid >
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="Auto"/>
                                                        <RowDefinition/>
                                                    </Grid.RowDefinitions>

                                                    <Border Background="{TemplateBinding Background}" Margin="6" Grid.Row="1">
                                                        <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                    </Border>
                                                </Grid>
                                            </Border>
                                        </Border>
                                    </Grid>

                                </Border>

                                <Border BorderThickness="0.5" CornerRadius="8" BorderBrush="White" Background="{x:Null}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0.5,0.5,1.5,0.5"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
</Application>
